import request from '@/utils/request.ts'
import { ResponseType, SubscribeType } from '@/type/typedefine.ts'

export function analysisRssRequest(
  rss: string,
): Promise<ResponseType<SubscribeType>> {
  return request({
    url: '/rss/analysis',
    method: 'post',
    params: {
      rss: rss,
    },
  })
}

export function subscribeRssRequest(
  rss: SubscribeType,
): Promise<ResponseType<any>> {
  return request({
    url: '/rss/subscribe',
    method: 'post',
    headers: { 'Content-Type': 'application/json;charset=UTF-8' },
    data: rss,
  })
}
